import Login from '../views/Login'
import Register from '../views/Register'
import NotFound from '../views/NotFound'
import Welcome from '../components/Welcome'
import ClassPage from '../components/ClassPage'
import Student from '../components/Student'
import Exam from '../components/Exam'
import Analyse from '../components/Analyse'
import AnalyseGrade from '../components/AnalyseGrade'
import AnalyseClass from '../components/AnalyseClass'
import AnalyseStudent from '../components/AnalyseStudent'
import User from '../components/User'
import Permission from '../components/Permission'
import {
    SmileOutlined,
    FundProjectionScreenOutlined,
    FileOutlined,
    TeamOutlined,
    UserOutlined,
    LockOutlined,
    ApartmentOutlined,
    RadarChartOutlined,
    PieChartOutlined,
    LineChartOutlined
} from '@ant-design/icons'

const whiteRoutes = [
    {
        path: '/login',
        component: Login,
        meta: {
            title: '登录页面'
        }
    },
    {
        path: '/register',
        component: Register,
        meta: {
            title: '注册页面'
        }
    },
    {
        path: '/404',
        component: NotFound,
        meta: {
            title: '404页面'
        }
    }
]

const permissionRoutes = [
    {
        path: '/admin/welcome',
        component: Welcome,
        meta: {
            title: '欢迎',
            icon: SmileOutlined
        }
    },
    {
        path: '/admin/class',
        component: ClassPage,
        meta: {
            title: '班级管理模块',
            icon: ApartmentOutlined
        }
    },
    {
        path: '/admin/student',
        component: Student,
        meta: {
            title: '学生管理模块',
            icon: TeamOutlined
        }
    },
    {
        path: '/admin/exam',
        component: Exam,
        meta: {
            title: '考试管理模块',
            icon: FileOutlined
        }
    },
    {
        path: '/admin/analyse',
        component: Analyse,
        meta: {
            title: '数据分析模块',
            icon: FundProjectionScreenOutlined
        },
        children: [
            {
                path: '/admin/analyse/grade',
                component: AnalyseGrade,
                meta: {
                    title: '年级成绩分析',
                    icon: LineChartOutlined
                }
            },
            {
                path: '/admin/analyse/class',
                component: AnalyseClass,
                meta: {
                    title: '班级成绩分析',
                    icon: PieChartOutlined
                }
            },
            {
                path: '/admin/analyse/student',
                component: AnalyseStudent,
                meta: {
                    title: '个人成绩分析',
                    icon: RadarChartOutlined
                }
            }
        ]
    },
    {
        path: '/admin/user',
        component: User,
        meta: {
            title: '个人中心',
            icon: UserOutlined
        }
    },
    {
        path: '/admin/permission',
        component: Permission,
        meta: {
            title: '权限管理',
            icon: LockOutlined
        }
    }
]

export { whiteRoutes, permissionRoutes }
